package com.xingtian.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import xingtian.admin.user.dao.UmsAdmin;
import xingtian.admin.user.service.UmsAdminService;
import xingtian.admin.user.service.impl.UmsAdminServiceImpl;

/**
 * @author 天火
 * @className TestController
 */
@Controller
public class TestController {

    @Autowired
    private UmsAdminService umsAdminService;

    @RequestMapping("/test")
    public String test(Model model){
        UmsAdmin umsAdmin = umsAdminService.findUserById(1L);
        model.addAttribute("msg",umsAdmin.getUsername());
        return "view/index";

    }
}
